package com.atguigu.kafka.listener;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class MyKafkaListener {

    /**
     * 设置监听的group和topic
     * @param message
     */
    @KafkaListener(topics = "ws",groupId = "hainiu")
    public void receiveAdminMessage(String message) {
        System.out.println("Received message: " + message);

    }

}
